package demo1;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author 李明洋
 * @date 2025/3/28 9:48
 * @version: 1.0
 */
public class Test {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context
                = new AnnotationConfigApplicationContext("demo1");
        User user = context.getBean(User.class);
        user.sayHello();

        Person person =context.getBean(Person.class);
        person.sayHi();
    }
}
